CXX := g++  
CXXFLAGS := -std=c++11 -Wall 
LATEX := xelatex  
  
SRC := main.cpp cal.cpp  
OBJ := $(SRC:.cpp=.o)  
EXECUTABLE := test
  
.PHONY: all clean report 
  
all: $(EXECUTABLE) 
  
$(EXECUTABLE): $(OBJ)  
	$(CXX) $(CXXFLAGS) $^ -o $@  
  
%.o: %.cpp  
	$(CXX) $(CXXFLAGS) -c $< -o $@  
  
clean:  
	rm -f $(OBJ) $(EXECUTABLE) output.txt \
	*.aux *.log *.out *.bbl *.pdf \
	*.blg *.bcf *.xml *.gz  

report: report.pdf  
  
report.pdf: report.tex  
	$(LATEX) $<  
	$(LATEX) $<  